package com.steven.ourcontest.report.viewmodel

import com.steven.ourcontest.base.BaseViewModel
import com.steven.ourcontest.forum.api.ForumApi
import com.steven.ourcontest.utils.plusAssign
import okhttp3.RequestBody

class ReportViewModel : BaseViewModel() {

    fun addReport(body: RequestBody, success:()->Unit){
        disposed += ForumApi.instance.addComplain(body)
            .subscribe({
                success.invoke()
            }, {
                it.printStackTrace()
            })
    }
}